package com.slz3.business.module.configManagement.conIndexNewGoods.steward;

import com.slz3.business.module.configManagement.conIndexNewGoods.domain.ConIndexNewGoods;
import com.slz3.business.module.configManagement.conIndexNewGoods.domain.ConIndexNewGoodsCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class ConIndexNewGoodsResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(ConIndexNewGoods.class).flatMap(conIndexNewGoods ->
                ConIndexNewGoodsResController.add(req, conIndexNewGoods)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(ConIndexNewGoodsCondition.class).flatMap(conIndexNewGoodsCondition ->
                ConIndexNewGoodsResController.delete(req, conIndexNewGoodsCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(ConIndexNewGoods.class).flatMap(conIndexNewGoods ->
                ConIndexNewGoodsResController.modify(req, conIndexNewGoods)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return ConIndexNewGoodsResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return ConIndexNewGoodsResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return ConIndexNewGoodsResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(ConIndexNewGoodsCondition.class).flatMap(conIndexNewGoodsCondition ->
                ConIndexNewGoodsResController.auditSubmit(req, conIndexNewGoodsCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(ConIndexNewGoodsCondition.class).flatMap(conIndexNewGoodsCondition ->
                ConIndexNewGoodsResController.audit(req, conIndexNewGoodsCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(ConIndexNewGoodsCondition.class).flatMap(conIndexNewGoodsCondition ->
                ConIndexNewGoodsResController.auditReject(req, conIndexNewGoodsCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(ConIndexNewGoodsCondition.class).flatMap(conIndexNewGoodsCondition ->
                ConIndexNewGoodsResController.usingEnable(req, conIndexNewGoodsCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(ConIndexNewGoodsCondition.class).flatMap(conIndexNewGoodsCondition ->
                ConIndexNewGoodsResController.usingDisable(req, conIndexNewGoodsCondition)
        );
    }   

}
